package com.ericsson.experience;

// import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ListFragment extends android.app.ListFragment {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		String[] values = new String[] { "Demo1", "Demo2", "Demo3",
				"Demo4", "Demo5", "Demo6", "Demo7", "Demo8",
				"Demo9", "Demo10" };
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
				android.R.layout.simple_list_item_1, values);
		setListAdapter(adapter);
	}

	@Override
	public void onListItemClick(ListView l, View v, int position, long id) {
		/*		String item = (String) getListAdapter().getItem(position);
		MapFragment fragment = (MapFragment) getFragmentManager()
				.findFragmentById(R.id.mapFragment);
		if (fragment != null) {
			fragment.setText(item);
		} else {
			Intent intent = new Intent(getActivity().getApplicationContext(),
					MainActivity.class);
			intent.putExtra("value", item);
			startActivity(intent);
		}
*/
	}
}